'''
综合案例：
定义函数  get_csv_data()、get_data_from_csv()
定义类    Csv_Util()
参数：
返回值：列表嵌套列表，不要首行
[['test01', '123456'], ['test02', '123456'], ['test03', '123456']]
'''
import csv

user_feild = ['username', 'password']
user1 = ['test01', '123456']
user2 = ['test02', '123456']
user3 = ['test03', '123456']
user_list = [user_feild, user1, user2, user3]
def get_csv_data(path):
    data_list = []
    with open(path, mode='r', encoding='utf-8') as f:
        f_csv_reader = csv.reader(f)
        next(f_csv_reader)
        for data in f_csv_reader:
            data_list.append(data)
    return data_list
if __name__ == '__main__':
    path = r'test.csv'
    print(get_csv_data(path))